
use data, clear
drop if control==1


ta sex,gen(s)
ta F4,gen(ed)
ta F13,gen(inc)
ta state,gen(st)

label var s1 "Male"
label var age "Age"
label var expellee "Expellee"
label var ed2 "Elementary Education"
label var ed3 "Secondary up to 8th degree"
label var ed4 "Secondary completed"
label var ed5 "Technical school"
label var ed6 "High school"
label var ed7 "University degree"

label var inc1 "Live comfortable"
label var inc2 "Make ends meet"
label var inc3 "Have difficulties"
label var inc4 "Major difficulties"

label var st1 "Baden-Wurttemberg"
label var st2 "Bavaria"
label var st3 "Hessen"
label var st4 "Mecklenburg-Vorpommern"
label var st5 "Lower-Saxony"
label var st6 "North Rhine-Westphalia"
label var st7 "Schleswig-Holstein"


label var spd "SPD"
label var cdu "CDU/CSU"
label var afd "AfD"
label var fdp "FDP"
label var linke "Die Linke"
label var greens "Grüne"


****Randomization Test*****
local vars expellee age s1 ed2 ed3 ed4 ed5 ed6 ed7  inc1 inc2 inc3 inc4 st1 st2 st3 st4 st5 st6 st7 spd cdu afd fdp linke greens
gen group=t1+2*t2+3*t3

iebaltab `vars', grpvar(group) onerow nottest feqtest pftest rowv starsno tblnon browse

